package main

import (
	"blog/config"
	"blog/internal/bootstrap"
	"blog/internal/routes"
	"fmt"
	"github.com/gin-gonic/gin"
)

func main() {

	cfg := config.GetConfig()

	ctx := bootstrap.Bootstrap(cfg)

	engine := gin.Default()

	routes.RegisterRoutes(ctx, engine)

	engine.Run(fmt.Sprintf(":%d", cfg.Server.Port))
}
